﻿/*---------------------------------------------------------------------*/
// fileName="IDirectory.cs" CompanyName="SureKAM"
// Copyright SureKAM (c). All right reserved.
/*---------------------------------------------------------------------*/

namespace SureKAM.BackUp.Notify.DataAccess
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using SureKAM.BackUp.Notify.Domain;
    using SureKAM.BackUp.Notify.Domain.ObjectValue;

    /// <summary>
    /// 目录仓储接口
    /// </summary>
    public interface IDirectory
    {
        /// <summary>
        /// 添加一个目录对像
        /// </summary>
        /// <param name="directory">目录对象</param>
        /// <returns>返回对象Guid</returns>
        string InsertDirectory(Directory directory);

        /// <summary>
        /// 获取得有的目录对象
        /// </summary>
        /// <returns>返回目录对象列表</returns>
        List<Directory> GetDirectorys();

        /// <summary>
        /// 更新相关目录对象
        /// </summary>
        /// <param name="directory">目录对象</param>
        /// <returns>返回更新后的目录对象</returns>
        Directory UpdateDirectory(Directory directory);

        /// <summary>
        /// 根据ID根获取相应的Directory对象
        /// </summary>
        /// <param name="id">对象ID</param>
        /// <returns>返回对应的ID值</returns>
        Directory GetDirectiryById(string id);

        /// <summary>
        /// 删除对应的Direcory对象
        /// </summary>
        /// <param name="id">Directory目录的ID值</param>
        /// <returns>返回删除的ID对象</returns>
        string DeleteDirectoryById(string id);

        /// <summary>
        /// 获取对应的通知对象
        /// </summary>
        /// <returns></returns>
        List<Notify> GetNotifys(string id);

        /// <summary>
        /// 获取邮件模板
        /// </summary>
        /// <returns></returns>
        SendTemplate GetTemplate();

        /// <summary>
        /// 保存到文件
        /// </summary>
        /// <returns></returns>
        bool SaveToFile();
    }
}
